<?php
	$user = $controller->getCurrentUser();
	
	$albumsList = array();
	foreach($user->getAlbumsBorrowed() as $bookId)
	{
		$book = book::singleton($bookId);
		$album = $book->getAlbumObject();
		$serie = serie::singleton($album->getIdserie());
		$albumsList[] = array(
			'name' => $album->getName(),
			'serieName' => $serie->getName(),
			'late' => $book->isLate()
		);
	}
	$controller->setVar('user', $user);
	$controller->setVar('albumsList', $albumsList);
	$controller->render('viewMyAccount');
?>